package com.csdnn;

import java.util.ArrayList;
import java.util.Iterator;

public class Test5 {
    public static void main(String[] args) {

        ArrayList<Object> objects = new ArrayList<>();
        objects.add(2);
        objects.add(3);
        objects.add("hello");
        objects.add("刘亮");
        objects.add(32);
        Iterator iterator=objects.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }

    }
}
